package main

import "fmt"

type Person struct {
	name string
}

func main() {
	var x int
	x = 1
	fmt.Println(x)
	fmt.Println()

	var p = new(int)
	*p = 1
	fmt.Println(p)
	fmt.Println()

	var p1 = new(Person)
	p1.name = "tom"
	fmt.Println(p1)
	fmt.Println()

	count := []int{1, 2, 3}
	count[x] = count[x] * 3 // 数组、slice或map的元素赋值
	count[x+1] *= 3         // 数组、slice或map的元素赋值
	fmt.Println(count)
	fmt.Println()

	v := 1
	v++
	fmt.Println(v)
	v--
	fmt.Println(v)
}
